//
//  DiaryModel.swift
//  YourName
//
//  Created by 李朋 on 2017/5/19.
//  Copyright © 2017年 李朋. All rights reserved.
//

import Foundation
import MJExtension

class DiaryModel {

    lazy var dataArray = [Diary]()
    
    init() {
        dataArray = DiaryListDAL.loadDiaryList(diaryId: Int(MAXINTERP))
    }
    
    func loadData(diaryId:Int) {
        dataArray = DiaryListDAL.loadDiaryList(diaryId: diaryId)
    }
    
    func loadMoreData(diaryId:Int) {
        dataArray += DiaryListDAL.loadDiaryList(diaryId: diaryId)
    }
    
    deinit {
        DLog("销毁")
    }
    
}












